package com.example.demo.zuhe;

/**
 * @Description   组合模式中的  组管理者
 * @Author youxin
 * @Version V1.0.0
 * @Since 1.0
 * @Date 2022/1/17
 */
public abstract class OrganizationComponent {
    private String name;
    private String desc;

    protected void add(OrganizationComponent organizationComponent){

    }

    protected void remove(OrganizationComponent organizationComponent){

    }

    //打印方法
    protected abstract void print();

    public OrganizationComponent(String name, String desc) {
        this.name = name;
        this.desc = desc;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
